﻿<Application x:Class="CYPlayer.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="PlayerWindow.xaml">
    <Application.Resources>
    	<ResourceDictionary>
            
    		<ResourceDictionary.MergedDictionaries>
    			<ResourceDictionary Source="CypResources.xaml"/>
    		</ResourceDictionary.MergedDictionaries>
    		
            <RadialGradientBrush x:Key="MyBackBrush"  Center="0,0" RadiusX="1" RadiusY="1"
    			GradientOrigin="0,0">
    			<RadialGradientBrush.GradientStops>
    				<GradientStopCollection>
    					<GradientStop Color="LightSkyBlue" Offset="0.4"/>
    					<GradientStop Color="White" Offset="0.5"/>
    					<GradientStop Color="LightSkyBlue" Offset="0.7"/>
    					<GradientStop Color="White" Offset="0.8"/>
    					<GradientStop Color="LightSkyBlue" Offset="0.9"/>
    					<GradientStop Color="White" Offset="1"/>
    				</GradientStopCollection>
    			</RadialGradientBrush.GradientStops>
    		</RadialGradientBrush>
            
    		<LinearGradientBrush x:Key="MyButtonBrush"
    			StartPoint="0,0" EndPoint="1,1">
    			<GradientStop Color="MediumBlue" Offset="0"/>
    			<GradientStop Color="#7094FF" Offset="0.5"/>
    			<GradientStop Color="MediumBlue" Offset="1"/>
    		</LinearGradientBrush>

    		<Style TargetType="{x:Type Button}">
    			<Setter Property="Margin" Value="5"/>
    			<Setter Property="Background" Value="{StaticResource MyButtonBrush}"/>
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="{x:Type Button}">
    						<Grid Width="{TemplateBinding Width}"
    							Height="{TemplateBinding Height}" ClipToBounds="True">

    							<Border x:Name="ShapeRectangle"
                                        Background="Transparent"
                                        BorderThickness="1"
                                        BorderBrush="White"/>
    							<DockPanel x:Name="MyContentPresenterDP">
    								<ContentPresenter x:Name="myCP" Margin="2"
                                                      Content="{TemplateBinding Content}"
                                                      TextBlock.Foreground="Black"/>
    							</DockPanel>
                            
    						</Grid>
    						<ControlTemplate.Triggers>
    							<Trigger Property="IsMouseOver" Value="True">
    								<Setter TargetName="ShapeRectangle" Property="Background" Value="#1196EE"/>
    								<Setter TargetName="myCP" Property="TextBlock.Foreground" Value="Black"/>
    							</Trigger>
    							<Trigger Property="IsPressed" Value="True">
    								<Setter TargetName="ShapeRectangle" Property="Background" Value="#50B655"/>
    								<Setter TargetName="myCP" Property="TextBlock.Foreground" Value="White"/>
    							</Trigger>
    							<Trigger Property="IsDefault" Value="True">
    								<Setter TargetName="ShapeRectangle" Property="Background" Value="Transparent"/>
    								<Setter TargetName="myCP" Property="TextBlock.Foreground" Value="White"/>
    							</Trigger>
    						</ControlTemplate.Triggers>
                        
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    		</Style>
        
    	</ResourceDictionary>
        
    </Application.Resources>
</Application>
